﻿using System;
using System.Drawing;

namespace MarioMapEditor
{
    class ObObject : ICloneable
    {
        protected int ID;
        protected int Info;
        protected int Posx;
        protected int Posy;
        protected int Width;
        protected int Height;
        protected int HashId;

        public ObObject()
        {
            ID      = 0;
            Info    = 0;
            Posx    = 0;
            Posy    = 0;
            Width   = 1;
            Height  = 1;
            HashId  = 0;
        }

        public virtual int GetID()
        {
            return ID;
        }

        public virtual bool SetID(int nID)
        {
            ID = nID;
            return true;
        }

        public virtual int GetINFO()
        {
            return Info;
        }

        public virtual bool SetINFO(int nInfo)
        {
            Info = nInfo;
            return true;
        }

        public virtual int GetX()
        {
            return Posx;
        }

        public virtual void SetX(int nX)
        {
            Posx = nX;
        }

        public virtual int GetY()
        {
            return Posy;
        }

        public virtual void SetY(int nY)
        {
            Posy = nY;
        }

        public virtual int GetWidth()
        {
            return Width;
        }

        public virtual int GetHeight()
        {
            return Height;
        }

        public virtual Bitmap GetBitmap()
        {
            return null;
        }

        public int GetHashId()
        {
            return HashId;
        }

        public void SetHashId(int hash)
        {
            HashId = hash;
        }

        public void Dispose()
        {
            ID      = 0;
            Info    = 0;
        }

        public object Clone()
        {
            return MemberwiseClone();
        }
    }
}
